"""
import sys

L = sys.argv
print(L)
"""
#魔法传参固定式
'''
class person():
    #可以传参的固定
    def __init__(self):
        self.gender = 'boy'
        self.age = 3

    def myinfo(self, name):
        print(f"my name is {name}, I'm {self.age}, is a {self.gender}.")

    def run(self):
        print("今天跑了5KM")

    def say(self):
        print("hello everybody!")

    money = "1 billion"


plj = person()
yaya = person()

#plj.say()
#print(plj.money)
plj.myinfo('wuhuana')
'''
# 单继承
"""
class Teacher():
    def Make_Cake(self):
        print("Unique formula，Centennial inheritance")


class Student(Teacher):
    pass


xiaojiu = Student()
xiaojiu.Make_Cake()

dacui = Student()
dacui.Make_Cake()
"""


# 多继承
'''
class Father():
    def car(self):
        print("has a BEN's car")


class Mother():
    def fly(self):
        print("has a fly-plane")


class Son(Father, Mother):
    pass


dabao = Son()
dabao.car()
dabao.fly()
'''

#魔法方法传参，动态。
'''
class person():
    # 可以动态传参的
    def __init__(self, x, y):
        self.gender = x
        self.age = y

    def myinfo(self, name):
        print(f"my name is {name}, I'm {self.age}, is a {self.gender}.")

    def run(self):
        print("今天跑了5KM")

    def say(self):
        print("hello everybody!")

    money = "1 billion"


yy = person('boy', 18)
yy.myinfo('SuNishi')
xx = person('girl', 25)
xx.myinfo('LiangJia')
print(xx.money)
'''

class person():
    # 可以动态传参的
    def __init__(self, x, y):
        self.gender = x
        self.age = y
    #def __str__(self):
        #return
     #   return '我是person类的对象'
    def __call__(self):
        print(self.gender,self.money)
    def myinfo(self,name):
        print(f"my name is {name}, I'm {self.age}, is a {self.gender}.")

    def run(self):
        print("今天跑了5KM")

    def say(self):
        print("hello everybody!")

    money = "1 billion"


p1 = person('maiden', 18)
p= p1.myinfo(name='SuNishi')
p1()
#print(p)
#print(p1)
